from PIL import Image
import os
import json
from werkzeug.security import check_password_hash, generate_password_hash
from shutil import move
from webapp.config import Config
from webapp import redis_store
from webapp.models import Pic, Album, PicFile, Tag, pic_albums
from webapp import db
import time
from multiprocessing.dummy import Pool as ThreadPool
from webapp.plugins.tasks import scan_tempdir_task, dispatch_file_task, dispatch_dir_task, check_pics_task, create_thumbnail_task, scan_dir, deal_file, delete_thumbnail_task,move_to_recycle_task
from webapp.plugins.functions import search_, check_pic_db_record, collect_log
from sqlalchemy.sql import and_, or_
from sqlalchemy import desc


a = redis_store.lrange('deal_error', 0,20)
for i in a:
    # print(i)
    d = eval(i)
    print(d)